package tuioZones;

public class PointXY {
	private float x;
	private float y;
	
	public PointXY(float x, float y) {
		this.x = x;
		this.y = y;
	}
	
	/**
	 * @return the x
	 */
	public float getX() {
		return x;
	}
	/**
	 * @param x the x to set
	 */
	public void setX(float x) {
		this.x = x;
	}
	/**
	 * @return the y
	 */
	public float getY() {
		return y;
	}
	/**
	 * @param y the y to set
	 */
	public void setY(float y) {
		this.y = y;
	}
	
	public float distanceTo(PointXY point) {
		return (float)Math.sqrt(Math.pow(x-point.getX(), 2) + Math.pow(y - point.getY(),2));
	}
	
	public String toString() {
		return "(" + x + "," + y +")";
	}
}
